package com.hmjk.health.util;

import java.io.Serializable;

public class DEV_DATA implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 8524345659962475057L;
	public static final String TYPE_LOCATE = "LOCA";  //定位
	public static final String TYPE_HEART_PULSE = "PULS"; //心跳脉搏
	public static final String TYPE_STEP_COUNTER = "STEP"; //计步器
	public static final String TYPE_GLUCOSE_METER = "GLUC"; //血糖仪
	public static final String TYPE_BLOOD_PRESSURE_METER = "PRES"; //血压计
	public static final String TYPE_SLEEP_MONITOR = "SLEP"; //睡眠监测
	public static final String TYPE_FALLDOWN_MONITOR = "FALL"; //摔倒监测
	public static final String TYPE_THERMOMETER = "TEMP"; //体温枪
	public static final String TYPE_OXIMETER = "SPO2"; //血痒仪
	public static final String TYPE_ELECTGRAPH = "HECG"; //心电仪
	
	public int index = -1;
	public String id = "";
	//public String fid = "";
	public String name;
	public String type;
	public int status = 1; //1正常，2冻结，0停用
	public int admin = 0; //0不是管理员 1是管理员 2无管理员
	
	public static boolean isHealthDev(String checktype){
		if(checktype.contains(DEV_DATA.TYPE_HEART_PULSE) || checktype.contains(DEV_DATA.TYPE_GLUCOSE_METER)
				|| checktype.contains(DEV_DATA.TYPE_BLOOD_PRESSURE_METER) || checktype.contains(DEV_DATA.TYPE_SLEEP_MONITOR)
				|| checktype.contains(DEV_DATA.TYPE_THERMOMETER) || checktype.contains(DEV_DATA.TYPE_OXIMETER)
				|| checktype.contains(DEV_DATA.TYPE_ELECTGRAPH)){
			return true;
		}
		return false;
	}
	
	public static boolean isSportDev(String checktype){
		if(checktype.contains(DEV_DATA.TYPE_STEP_COUNTER)){
			return true;
		}
		return false;
	}
	
	public static boolean isLocationDev(String checktype){
		if(checktype.contains(DEV_DATA.TYPE_LOCATE)){
			return true;
		}
		return false;
	}
	
	public void clear(){
		index = -1;
		id = "";
		//fid = "";
		name = null;
		type = null;
		status = 1;
		admin = 0;
	}
	
	@Override
	public String toString(){
		return "DEV_DATA("+id+","+name+","+type+")";
	}
}
